﻿using BDShop.DAL;
using BDShop.Entities;
using System;
using System.Collections.Generic;
using IsolationLevel = System.Transactions.IsolationLevel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BDShop.Business
{
   public class CategoryService
    {
        public static List<Category> GetListCategoryCacheModel()
        {
            List<Category> lstCategory = new List<Category>();
            using (var context = new BDShopEntities(IsolationLevel.ReadUncommitted))
            {
                lstCategory = context.Categories.ToList();
            }

            return lstCategory;
        }
    }
}
